# -*- coding: utf-8 -*-

'''
/**
 * @addtogroup read_excel_param_list
 * read_excel_param_list
 * @{
 */
/**
 * @file        read_excel_param_list.py
 * @brief       XXXX
 * @note        XXXX
 * @author      靳普诏(puzhao.jin@hopechart.com)
 * @date        2024/04/18
 * @version     1.0

 * @par         修改日志
 * <table>
 * <tr><th>Date         <th>Version     <th>Author      <th> Description
 * <tr><td>2024/04/18   <td>1.0         <td>靳普诏       <td> 创建初始版本
 * @copyright   xxxx
 */
'''

import sys
import os

from pyazlib import EasyXlsx


def ReadExcelParamList(xlsx_name:str, sheet_name:str) -> list :
    '''
    @brief       XXXX
    @param[in]   xlsx_name:str     XXXX
    @param[in]   sheet_name:str    XXXX
    @return      list     XXXX
    '''
    # 打开Excel文件
    xlsx_file = EasyXlsx.TXlsx(xlsx_name)
    
    # 获取所有单元格内容
    param_list = xlsx_file.sheetToDictListByRow(sheet_name)

    return param_list
    






if __name__ == "__main__":
    ## 获取当前脚本所在的目录
    SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
    # 输出目录路径
    print("SCRIPT_DIR: "+ SCRIPT_DIR)

    ## 获取脚本传参
    argv = sys.argv
    argc = len(argv)
    # 打印命令行参数
    #for i in range(1, argc):
        #print("参数", i, ":", argv[i])
        
    print("============= BIGEN: read_excel_param_list.py =============")

    test = ReadExcelParamList(f"{SCRIPT_DIR}/../atserver_ext_attr.xlsx", "set")


    print("============= END: read_excel_param_list.py =============")



## Generated on "2024-04-18 17:02:55" by the tool "gen_hq_file.py >> V20231119" 

